<template>
  <div class="subrecode other_common">
    <table class="common">
      <thead>
        <tr>
          <th>订单编号</th>
          <th>用户(Id)</th>
          <th>下分金额</th>
          <th>申请时间</th>
          <th>订单状态</th>
          <th>备注</th>
          <th>管理操作</th>
        </tr>
      </thead>
      <tbody>
        <tr v-for="(item, index) in subRecordList" :key="index">
          <td>{{ item.id }}</td>
          <td>{{ item.nickname }}({{ item.id }})</td>
          <td>{{ item.pay_money }}</td>
          <td>{{ item.create_time }}</td>
          <td style="color:#3A4E89">
            {{ item.status == 1 || 0 ? "下分成功" : "下分失败" }}
          </td>
          <td>
            {{
              item.status == 0
                ? "手动下分成功（手动下分）"
                : item.status == 1
                ? "下" + item.pay_money
                : ""
            }}
          </td>
          <td style="color:#3A4E89">
            {{ item.status == 1 || 0 ? "已同意" : "已拒绝" }}
          </td>
        </tr>
      </tbody>
    </table>
  </div>
</template>

<script>
import { mapState, mapActions } from "vuex";
export default {
  computed: {
    ...mapState("subrecord", ["subRecordList"])
  },
  methods: {
    ...mapActions("subrecord", ["getSubRecordList"])
  },
  created() {
    this.getSubRecordList();
  }
};
</script>

<style>
.subrecode {
  padding-top: 10px;
}
</style>
